package com.ynny.mapper;

import com.ynny.entity.Emp;
import com.ynny.entity.EmpDTO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface EmpMapper {


    List<Emp> selectAll();
    List<Emp> selectAllEmpByLikeName(String empName);

    List<EmpDTO> selectAllEmpAndDepartName();

    List<Map> selectAllEmpAndDepartNameByMap();

    Emp selectOneById(Integer id);

    Emp selectOneByNameAndSalary(@Param(value = "empName") String empName,
                                 @Param("salary") BigDecimal salary);


    Emp selectOneByNameAndSalary(Emp emp);


    int updateEmp(Emp emp);

    //返回的是影响的行数
    int insertEmp(Emp emp);


}
